package com.iflytek.yly.jetpackdemo.databinding;

import android.os.Bundle;
import android.view.animation.LinearInterpolator;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.LinearLayoutManager;

import com.iflytek.yly.jetpackdemo.BR;
import com.iflytek.yly.jetpackdemo.R;

public class SimpleTextViewDemo7Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ActivityDatabindingDemo7Binding activityDatabindingDemo7Binding =
                DataBindingUtil.setContentView(this,R.layout.activity_databinding_demo7);
        activityDatabindingDemo7Binding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
//        activityDatabindingDemo7Binding.recyclerView.setHasFixedSize(true);

        RecyclerViewAdapter recyclerViewAdapter  = new RecyclerViewAdapter(new RecyclerViewViewModel().getBooks());
        activityDatabindingDemo7Binding.recyclerView.setAdapter(recyclerViewAdapter);

    }
}